package com.ruoyi.znjc.domain;
import java.time.LocalTime;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 预警定时对象 znjc_timers
 * 
 * @author ruoyi
 * @date 2025-07-26
 */
public class ZnjcTimers extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 定时器ID */
    private Long timerId;

    /** 订阅ID */
    @Excel(name = "订阅ID")
    private Long usersubId;

    /** 预警开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "预警开始时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date effectiveStartTime;

    /** 预警结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "预警结束时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date effectiveEndTime;

    /** 检测间隔（小时） */
    @Excel(name = "检测间隔", readConverterExp = "小=时")
    private Long pollInterval;

    /** 定时器名称 */
    @Excel(name = "定时器名称")
    private String timerName;

    /** 状态 */
    @Excel(name = "状态")
    private String timerStatus;

    /** 轮询类型（interval/daily_range） */
    @Excel(name = "轮询类型", readConverterExp = "i=nterval/daily_range")
    private String pollType;

//    /** 每日检测开始时间（仅用于daily_range） */
//    @Excel(name = "每日检测开始时间", readConverterExp = "仅=用于daily_range")
//    private Date pollStartTime;
//
//    /** 每日检测结束时间（仅用于daily_range） */
//    @Excel(name = "每日检测结束时间", readConverterExp = "仅=用于daily_range")
//    private Date pollEndTime;

    @Excel(name = "每日检测开始时间", readConverterExp = "仅=用于daily_range")
    private LocalTime pollStartTime;

    @Excel(name = "每日检测结束时间", readConverterExp = "仅=用于daily_range")
    private LocalTime pollEndTime;

    /** 上次执行时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "上次执行时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date lastExecuteTime;


    public void setTimerId(Long timerId) 
    {
        this.timerId = timerId;
    }

    public Long getTimerId() 
    {
        return timerId;
    }

    public void setUsersubId(Long usersubId) 
    {
        this.usersubId = usersubId;
    }

    public Long getUsersubId() 
    {
        return usersubId;
    }

    public void setEffectiveStartTime(Date effectiveStartTime) 
    {
        this.effectiveStartTime = effectiveStartTime;
    }

    public Date getEffectiveStartTime() 
    {
        return effectiveStartTime;
    }

    public void setEffectiveEndTime(Date effectiveEndTime) 
    {
        this.effectiveEndTime = effectiveEndTime;
    }

    public Date getEffectiveEndTime() 
    {
        return effectiveEndTime;
    }

    public void setPollInterval(Long pollInterval) 
    {
        this.pollInterval = pollInterval;
    }

    public Long getPollInterval() 
    {
        return pollInterval;
    }

    public void setTimerName(String timerName) 
    {
        this.timerName = timerName;
    }

    public String getTimerName() 
    {
        return timerName;
    }

    public void setTimerStatus(String timerStatus) 
    {
        this.timerStatus = timerStatus;
    }

    public String getTimerStatus() 
    {
        return timerStatus;
    }

    public void setPollType(String pollType) 
    {
        this.pollType = pollType;
    }

    public String getPollType() 
    {
        return pollType;
    }
    public LocalTime getPollStartTime() {
        return pollStartTime;
    }

    public void setPollStartTime(LocalTime pollStartTime) {
        this.pollStartTime = pollStartTime;
    }

    public LocalTime getPollEndTime() {
        return pollEndTime;
    }

    public void setPollEndTime(LocalTime pollEndTime) {
        this.pollEndTime = pollEndTime;
    }

    public Date getLastExecuteTime()
    {
        return lastExecuteTime;
    }

    public void setLastExecuteTime(Date lastExecuteTime) {
        this.lastExecuteTime = lastExecuteTime;
    }

//    public void setPollStartTime(Date pollStartTime)
//    {
//        this.pollStartTime = pollStartTime;
//    }
//
//    public Date getPollStartTime()
//    {
//        return pollStartTime;
//    }
//
//    public void setPollEndTime(Date pollEndTime)
//    {
//        this.pollEndTime = pollEndTime;
//    }
//
//    public Date getPollEndTime()
//    {
//        return pollEndTime;
//    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("timerId", getTimerId())
            .append("usersubId", getUsersubId())
            .append("effectiveStartTime", getEffectiveStartTime())
            .append("effectiveEndTime", getEffectiveEndTime())
            .append("pollInterval", getPollInterval())
            .append("timerName", getTimerName())
            .append("timerStatus", getTimerStatus())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .append("pollType", getPollType())
            .append("pollStartTime", getPollStartTime())
            .append("pollEndTime", getPollEndTime())
                .append("lastExecuteTime", getLastExecuteTime())
            .toString();
    }
}
